home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 February / EnigmA AMIGA RUN 15 (1997)(G.R. Edizioni)(IT)[!][issue 1997-02][PLANET CD V].iso / enigma / earcd / business / autorexx.lha / PlugIns / AIClient.rexx < prev    next >
OS/2 REXX Batch file  |  1996-12-28  |  958b  |  52 lines

  1. /*
  2.     AIClient.rexx - DB PlugIn : Auto-Insert Client name into database
  3.     (c) 1996 Karl Mottram - Bifrost Industries
  4.     Started 1530 hrs - 03-12-96
  5.     Last Updated $VER: v1.0_(11-12-96) - Basics...
  6. */
  7.  
  8. Init:
  9.     Signal On BREAK_C                /* Break Trapping      */
  10.     SpyFile = "LOGS:BioWare.log"        /* For Expansion       */
  11.     ListFile = "AutoRexx/Client.lst"    /* Client list file    */
  12.  
  13.     Options Results
  14.  
  15. Watch4Num:
  16.     GETFIELD JNum
  17.         InNum = RESULT
  18.  
  19.     CNum = Left(InNum,2)
  20.  
  21.     say CNum
  22.  
  23. GetNum:
  24. Open(CList,'ENV:'ListFile,R)
  25.     Do until EOF(CList)
  26.         CLine = Readln(CList)
  27.             If Left(CLine,2) = CNum then Signal Gottit
  28.     end
  29. Close(CList)
  30.     SCREENTOFRONT
  31.     Okay1 "This number is not currently assigned to any clients."
  32.     Signal Exzit
  33.  
  34. Gottit:
  35.     CName = DelWord(CLine,1,1)
  36.  
  37. OutCName:
  38.     CURRENTFIELD Client
  39.     PUTFIELD CName
  40.  
  41. Exzit:
  42.     Address Command 'c:Copy ENV:'ListFile 'to ENVARC:'ListFile
  43.     Exit
  44.  
  45. /*
  46. Watch JNum
  47. Strip Left(JNum,2)
  48. Get client name from data
  49. CURRENTFIELD Client
  50. PUTFIELD CName
  51. */
  52.